how long does it take to write a book